import 'package:flutter_taotaoshipin/generated/json/base/json_convert_content.dart';
import 'package:flutter_taotaoshipin/model/interact_user_share_entity.dart';

InteractUserShareEntity $InteractUserShareEntityFromJson(
    Map<String, dynamic> json) {
  final InteractUserShareEntity interactUserShareEntity = InteractUserShareEntity();
  final int? state = jsonConvert.convert<int>(json['state']);
  if (state != null) {
    interactUserShareEntity.state = state;
  }
  final String? msg = jsonConvert.convert<String>(json['msg']);
  if (msg != null) {
    interactUserShareEntity.msg = msg;
  }
  final bool? incomeState = jsonConvert.convert<bool>(json['income_state']);
  if (incomeState != null) {
    interactUserShareEntity.incomeState = incomeState;
  }
  final String? incomeMsg = jsonConvert.convert<String>(json['income_msg']);
  if (incomeMsg != null) {
    interactUserShareEntity.incomeMsg = incomeMsg;
  }
  return interactUserShareEntity;
}

Map<String, dynamic> $InteractUserShareEntityToJson(
    InteractUserShareEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['state'] = entity.state;
  data['msg'] = entity.msg;
  data['income_state'] = entity.incomeState;
  data['income_msg'] = entity.incomeMsg;
  return data;
}

extension InteractUserShareEntityExtension on InteractUserShareEntity {
  InteractUserShareEntity copyWith({
    int? state,
    String? msg,
    bool? incomeState,
    String? incomeMsg,
  }) {
    return InteractUserShareEntity()
      ..state = state ?? this.state
      ..msg = msg ?? this.msg
      ..incomeState = incomeState ?? this.incomeState
      ..incomeMsg = incomeMsg ?? this.incomeMsg;
  }
}